﻿<%@ Page Language="C#" Culture="th-TH" AutoEventWireup="true" CodeBehind="WF_DetailLoanPayment.aspx.cs"
    Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.WF_DetailLoanPayment" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">

    <script type="text/javascript" src="../../Scripts/DatePicker.js">
        
    </script>

    <script type="text/javascript">
       function openProjectDetails(id) {
           radopen("ES_MoveRequestJobsite.aspx?id=" + id, "ProjectDtls");
           return false;

       }
    </script>

    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
</head>
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">

    <script type="text/javascript">

                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
 
    </script>

</telerik:RadCodeBlock>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
        <telerik:RadWindow ID="ProjectDtls" runat="server" ShowContentDuringLoad="false"
            VisibleStatusbar="false" Title="" Width="800px" Height="600px" Modal="true" Behaviors="Close">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
<form id="form1" runat="server">
<asp:scriptmanager id="ScriptManager1" runat="server">
        </asp:scriptmanager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnSearch">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnShowAll">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rcb1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="rcb1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<div class="moduleDivSlim1000x450">
    <div class="moduleDivBottom1000">
        <table align="center" width="980px" class="tableHeader">
            <tr>
                <td>
                    บัญชีรายละเอียด
                </td>
            </tr>
        </table>
        <table width="980px" align="center">
            <tr>
                <td align="center">
                    <asp:panel id="Panel5" runat="server" height="400px" width="980px"  scrollbars="Auto">
                    <telerik:RadGrid 
                            ID="RadGrid1" 
                            runat="server" 
                            AllowAutomaticDeletes="True" 
                            AllowFilteringByColumn="True" 
                            AllowMultiRowEdit="True" 
                            AllowMultiRowSelection="True" 
                            AllowPaging="True" 
                            AllowSorting="True" 
                            AutoGenerateColumns="False" 
                            EnableAJAX="True" 
                            EnableAJAXLoadingTemplate="True" 
                            GridLines="None" 
                            OnItemCommand="RadGrid1_ItemCommand" 
                            Skin="Outlook" 
                            width="970px"  onitemcreated="RadGrid1_ItemCreated" 
                onitemdatabound="RadGrid1_ItemDataBound" 
                        onneeddatasource="RadGrid1_NeedDataSource">
                            <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                                ClientDataKeyNames="cont_dtls_seq" 
                                CommandItemDisplay="Top" 
                                DataKeyNames="cont_dtls_seq" 
                                InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                <CommandItemTemplate>
                                 
                                 
                                 

                                 
                                 
                                    <table width="100%">
                                        <tr>
                                            <td align="left"  >
                                                <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                                    CommandName="InitInsert" Visible="<%# !RadGrid1.MasterTableView.IsItemInserted && RadGrid1.EditIndexes.Count <= 0 %>">
                                        <img style="border:0px;vertical-align:middle;" alt="" 
                                        src="../Images/Buttons/AddRecord.gif" /> เพิ่มรายละเอียดการชำระเงินกู้</asp:LinkButton>
                                               </td>
                                            <td align="right">
                                                
                                            </td>
                                        </tr>
                                    </table>
                                    
                                    
                       
                                    
                                    
                                </CommandItemTemplate>
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="15px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn>
                                    <HeaderStyle Width="15px" />
                                </ExpandCollapseColumn>                                
                                <Columns>
                        
                        
                                <telerik:GridEditCommandColumn 
                                        EditText = "คลิกเพื่อแก้ไขรายการ"
                                        ButtonType="ImageButton">
                                        <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                        <ItemStyle HorizontalAlign="Center" Width="15px" />
                                    </telerik:GridEditCommandColumn>
                                  
                                  
                                  
                                    <telerik:GridButtonColumn 
                                        ButtonType="ImageButton" 
                                        CommandName="Delete" 
                                        ConfirmDialogType="RadWindow" 
                                        ConfirmText="ลบข้อมูลที่เลือก?" 
                                        ItemStyle-Width="15" 
                                        Text="คลิกเพื่อลบรายการ" 
                                        UniqueName="column1">
                                        <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                        <ItemStyle HorizontalAlign="Center" Width="15px"/>
                                    </telerik:GridButtonColumn>
                               
                                    <telerik:GridBoundColumn 
                                        DataField="Sequence" 
                                        DataType="System.Int32" 
                                        Display="False" 
                                        HeaderText="Sequence" 
                                        ReadOnly="True" 
                                        UniqueName="Sequence" 
                                        Visible="False">
                                    </telerik:GridBoundColumn>
                                    
                                    
                                
                                    <telerik:GridTemplateColumn
                                        DataField="period2" 
                                        HeaderText = "งวดที่"
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter="true" 
                                        CurrentFilterFunction="Contains" 
                                        ShowFilterIcon="False">
                                    <ItemTemplate>
                                    <%# Eval("period2")%>                        
                                             </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                    </telerik:GridTemplateColumn>
                                
                                
                                  <telerik:GridBoundColumn 
                                        DataField="pay_date" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="วันที่ชำระเงิน" 
                                         DataFormatString="{0:dd/MM/yyyy}"
                                        UniqueName="pay_date">
                                       
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                     </telerik:GridBoundColumn> 
                                     
                                     
                                     
                                      <telerik:GridBoundColumn 
                                        DataField="total" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="จำนวนเงินที่ชำระ" 
                                        UniqueName="total"
                                            DataFormatString="{0:#,##0.00}"
                                        >
                           
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                 </telerik:GridBoundColumn> 
                                 
                                 
                                 
                                       <telerik:GridBoundColumn 
                                        DataField="pay_amount" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="เงินต้น" 
                                        UniqueName="pay_amount"
                                            DataFormatString="{0:#,##0.00}"
                                        >
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                 </telerik:GridBoundColumn>        
                            
                               
                               <telerik:GridBoundColumn 
                                  
                                        DataField="pay_interest" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="ดอกเบี้ย" 
                                        UniqueName="pay_interest"
                                        DataFormatString="{0:#,##0.00}"
                                  >
                                   <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                  </telerik:GridBoundColumn>
                                  
                                   
                               <telerik:GridBoundColumn 
                                  
                                        DataField="pay_flag2" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="ช่องทางการชำระ" 
                                        UniqueName="pay_flag2"
                                        DataFormatString="{0:#,##0.00}"
                                    
                                        >
                                         <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                  </telerik:GridBoundColumn>
                                                                     
                           
                                    
                                    
                                    
                                    <telerik:GridTemplateColumn 
                                        DataField="remarks" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="หมายเหตุ" 
                                        UniqueName="remarks">
                                         <ItemTemplate>
                                    <%# Eval("remarks")%> 
                                    </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                                                     
                           
                                    </telerik:GridTemplateColumn>
                                    
                                    
                                  
                                    
                                    
                                    
                                </Columns>
                                
                                
                                <EditFormSettings                                     
                                    EditFormType="WebUserControl" 
                                    UserControlName="../UserControls/WF_DetailLoanPayment.ascx">
                                    <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                                </EditFormSettings>
                                
                                
                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                            </MasterTableView>
                            <ClientSettings AllowColumnHide="True" 
                                AllowColumnsReorder="True" 
                                EnableRowHoverStyle="True" 
                                ReorderColumnsOnClient="True">
                                <Selecting AllowRowSelect="True" 
                                EnableDragToSelectRows="true" />
                                </ClientSettings>
                        </telerik:RadGrid>
                        
                        
                                      
                        
                        
            </asp:panel>
                </td>
            </tr>
        </table>
    </div>
</div>
<br />
</form>
</html>
